<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>CSS 渐变阴影</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        font-family: sans-serif;
        box-sizing: border-box;
      }

      body {
        background: hsl(0deg, 0%, 8%);
      }

      main {
        width: 100vw;
        height: 100vh;
        max-width: 100%;
        display: grid;
        place-items: center;
      }

      .box {
        width: 350px;
        height: 500px;
        background: hsl(0deg, 0%, 8%);
        border-radius: 8px;
        position: relative;
      }

      .box::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(
          45deg,
          hsl(300deg, 100%, 50%),
          hsl(200deg, 100%, 50%),
          hsl(100deg, 100%, 50%)
        );
        border-radius: 8px;
        filter: blur(24px);
        z-index: -1;
      }
    </style>
  </head>
  <body>
    <main>
      <div class="box"></div>
    </main>
  </body>
</html>
